<div class="form">
    <?php
    /** @var PedidoController $this */
    /** @var Pedido $model */
    /** @var AweActiveForm $form */
    $form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array(
        'id' => 'pedido-form',
        'enableAjaxValidation' => true,
        'enableClientValidation' => false,
    ));
    ?>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span5" id="contenedorDetalle">
                <div class="" id="headerDetalle"> 
                    <h3>   Header de Detalle  </h2>  <a href="#" class="btn btn-info pull-right"><i class="icon-white icon-tag"></i> Ticket</a>
                </div>
                <div class="detalleMenuCaja">



                    <div style="max-height: 320px;overflow: auto;">
                        <table id="menu" class="items table table-striped table-bordered table-hover table-advance table-condensed">
                            <thead>
                                <tr>
                                    <th id="orden-producto-grid_c0">Cantidad</th>
                                    <th style="width:80px" id="orden-producto-grid_c1">Menu</th>
                                    <th id="orden-producto-grid_c2">Precio</th>
                                    <th id="orden-producto-grid_c2">Subtotal</th>

                                    <th class="button-column" id="orden-producto-grid_c3">&nbsp;</th>
                                </tr>
                            </thead>
                            <tbody >
                                <!-- CONTENIDO DE LA TABLA -->
                            </tbody>
                        </table>
                    </div>
                    <div class="space20"></div>
                    <div class="row-fluid">
                        <hr>
                        <div class="span4 invoice-block pull-right">

                            <hr>
                            <ul class="unstyled amounts" style="text-align: left; padding-right: 5px;">
                                <li><strong>Total :</strong><div class="pull-right">$ <span id="total">0</span></div> </li>
                            </ul>
                        </div>
                    </div>

                    <div class="" style="padding-left: 5%" id="camposPedido">

                        <div class="row-fluid">
                            <div class="span6">
                                <?php // echo $form->checkBoxRow($model, 'estado_pago') ?>
                                <?php echo $form->labelEx($model, 'estado_pago'); ?>
                                <?php
                                $this->widget(
                                        'bootstrap.widgets.TbToggleButton', array(
                                    'model' => $model,
                                    'disabledLabel' => 'Cancelado',
                                    'enabledLabel' => 'Pendiente',
                                    'width' => 200,
                                    'attribute' => 'estado_pago',
//                                        'htmlOptions' => array('tabindex' => "$cont"),
                                    'onChange' => 'js:function($el, status, e){}'
                                        )
                                );
                                ?>
                                
                                  <?php echo $form->textAreaRow($model, 'observaciones', array('rows' => 3, 'cols' => 50)) ?>
                            </div>
                            <div class="span6">
                                <div class="controls">
                                    <?php echo $form->labelEx($model, 'facturacion'); ?>
                                    <?php
                                    $this->widget(
                                            'bootstrap.widgets.TbToggleButton', array(
                                        'model' => $model,
                                        'disabledLabel' => 'NO',
                                        'enabledLabel' => 'SI',
                                        'width' => 100,
                                        'attribute' => 'facturacion',
//                                        'htmlOptions' => array('tabindex' => "$cont"),
                                        'onChange' => 'js:function($el, status, e){}'
                                            )
                                    );
                                    ?>
                                 <span class="help-block error" id="Pedido_facturacion_em_"></span>
                                </div>

                            </div>
                        </div>
                        <?php echo $form->hiddenField($model, 'ticket_id', array('' => ' -- Seleccione -- ') + CHtml::listData(Ticket::model()->findAll(), 'id', Ticket::representingColumn())) ?>
                        <?php // echo $form->dropDownListRow($model, 'ticket_id', array('' => ' -- Seleccione -- ') + CHtml::listData(Ticket::model()->findAll(), 'id', Ticket::representingColumn())) ?>
                        <?php // echo $form->textFieldRow($model, 'fecha') ?>
                        <?php echo $form->hiddenField($model, 'valor_total', array('maxlength' => 10)) ?>

                        <?php // echo $form->dropDownListRow($model, 'estado', array('ABIERTO' => 'ABIERTO', 'CERRADO' => 'CERRADO', 'ANULADO' => 'ANULADO',)) ?>

                        <?php // echo $form->textAreaRow($model, 'observaciones', array('rows' => 3, 'cols' => 50)) ?>
                    </div>

                    <div class="footerMenus">
                        <div class="form-actions-float flotante">
                            <?php
                            $this->widget('bootstrap.widgets.TbButton', array(
                                'buttonType' => 'submit',
                                'type' => 'primary',
                                'label' => $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save'),
                            ));
                            ?>

                            <?php
                            $this->widget('bootstrap.widgets.TbButton', array(
                                //'buttonType'=>'submit',
                                'label' => Yii::t('AweCrud.app', 'Cancel'),
                                'htmlOptions' => array('onclick' => 'javascript:history.go(-1)')
                            ));
                            ?>
                        </div>


                    </div>
                </div>
            </div>
            <div class="span7" id="contenedorMenuCaja">
                <div class="" id="headerCaja">
                    <h3>   Header de menus  </h2> 
                </div>
                <div class="menuCaja">



                    <div class="metro-nav ">
                        <?php foreach ($secciones as $seccion) : ?>

                            <div class="metro-nav-block nav-block-grey">
                                <a href="#" data-original-title="">
                                    <i class="imagenSeccion"><?php echo CHtml::image(Yii::app()->baseUrl . "/uploads/images/$seccion->imagen") ?></i>
                                    <div class="info"></div>

                                </a>
                                <div class="status"><?php echo $seccion->nombre ?></div>
                            </div>

                        <?php endforeach; ?>





                    </div>

                </div>
                <div class="" id="footerCaja">
                    este es el footer
                </div>

            </div>
        </div>
    </div>


    <?php $this->endWidget(); ?>
</div>